package com.adms.domain;

import com.adms.domain.User;
import com.adms.domain.UserExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
	
//	
	User selectDefaultGridUserBySiteId(Integer siteId);
	User selectDefaultHandleUserBySiteId(Integer siteId);
	User selectDefaultLegalUserBySiteId(Integer siteId);
	List<User> selectByRoles(String roles);
	List<User> selectByUserIds(String userIds);
	List<User> selectDefaultGridUsers();
	User selectByOpenid(String openid);
	User selectByPhone(String phone);
	List<User> selectGridUsersByGridId(Integer gridId);
	List<User> selectGridUsersBySiteId(Integer siteId);
	List<User> selectHandleUsersBySiteId(Integer siteId);
	List<User> selectLegalUsersBySiteId(Integer siteId);
	List<User> selectTransferHandleUsersBySiteId(Integer siteId);
	List<User> selectTransferGridUsersBySiteId(Integer siteId);
	List<User> selectRelativeUsersBySiteId(Integer siteId);
	void deleteBatch(int[] userIds);
//	
	
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);


}